<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>管理员</title>
</head>
<script>
  if(!localStorage.admin_token){
    location.href = '/admin/login'
  }
</script>
  <!-- Jquery -->
  <script src="./js/jquery.min.js"></script>

  <!-- Popper  popper 在 bootstrap之前引入 -->
  <script src="./js/popper.js"></script>

  <link rel="stylesheet" href="./css/all.css">

  <!-- bootstarp -->
  <link rel="stylesheet" href="./css/bootstrap.min.css">
  <script src="./js/bootstrap.min.js"></script>

  <!-- bootstrap-table -->
  <link rel="stylesheet" href="./css/bootstrap-table.min.css">
  <script src="./js/bootstrap-table.min.js"></script>

  <!-- bootstarp 语言包 -->
  <script src="./js/bootstrap-table-locale-all.min.js"></script>

  <!-- table导出XLS,XML,SQL,JSON,PDF,TXT,CSV -->
  <script src="./js/bootstrap-table-export.min.js"></script>

  <script src="./js/tableexport.js"></script>

  <!-- xlsx -->
  <script src="./js/xlsx.core.min.js"></script>

  <!-- 常用方法 -->
  <script src="./js/public.js"></script>

  <!-- Axios -->
  <script src="./js/axios.min.js"></script>
  <!-- 表格修改 -->
<!--  <script src="./js/bootstrap-table-editable.js"></script>
  <script src="./js/bootstrap-table-cell-input.js"></script>
  <link rel="stylesheet" href="./css/bootstrap-table-cell-input.css"> -->
  <style>
    #toolbar {
      margin: 0;
    }
  </style>




<body>

  <div id="toolbar" class="select w-100">
    <!-- <select class="form-control  d-inline-block">
      <option value="">Export Basic</option>
      <option value="all">Export All</option>
      <option value="selected">Export Selected</option>
    </select> -->

    <!-- 切换搜索字段 -->
	<div class="input-group mb-3">

    <!-- 修改综合成绩比例modal -->
    <div class="modal fade" id="proportion" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="staticBackdropLabel" aria-hidden="true">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <h5 class="modal-title" id="staticBackdropLabel">修改综合成绩分配比例</h5>
            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
              <span aria-hidden="true">&times;</span>
            </button>
          </div>
          <div class="modal-body">
            <p>输入框内填写百分比数值</p>
            <div class="input-group input-group-sm mb-3">
              <div class="input-group-prepend">
                <span class="input-group-text" id="inputGroup-sizing-sm">(PHP 成绩 *</span>
              </div>
              <input type="text" id="phpproportion" class="form-control" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-sm">
              <div class="input-group-prepend">
                <span class="input-group-text" id="inputGroup-sizing-sm">%) + (Python 成绩 *</span>
              </div>
              <input type="text" id="pythonproportion" class="form-control" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-sm">
              <div class="input-group-prepend">
                <span class="input-group-text" id="inputGroup-sizing-sm">%)  </span>
              </div>
            </div>

          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
            <button type="button" class="btn btn-primary" id="saveproportion">保存</button>
          </div>
        </div>
      </div>
    </div>

    <!-- 修改modal -->

    <div class="modal fade" id="editModal" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="staticBackdropLabel" aria-hidden="true">
      <div class="modal-dialog  modal-lg" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <h5 class="modal-title" id="staticBackdropLabel">修改</h5>
            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
              <span aria-hidden="true">&times;</span>
            </button>
          </div>
          <div class="modal-body">
            <input type="text" hidden id='editIndex'>
            <div class="input-group mb-3">
              <div class="input-group-prepend">
                <span class="input-group-text" id="basic-addon1">学号</span>
              </div>
              <input id="editStuid" type="text" class="form-control" placeholder="学号" readonly aria-label="stu-id" aria-describedby="basic-addon1">
            </div>
            <div class="input-group mb-3">
              <div class="input-group-prepend">
                <span class="input-group-text" id="basic-addon1">姓名</span>
              </div>
              <input id="editName" type="text" readonly class="form-control" placeholder="姓名" aria-label="name" aria-describedby="basic-addon1">
            </div>
            <div class="input-group mb-3">
              <div class="input-group-prepend">
                <span class="input-group-text" id="basic-addon1">班级</span>
              </div>
              <input id="editClass" type="text" readonly class="form-control" placeholder="班级" aria-label="class" aria-describedby="basic-addon1">
            </div>
            <div class="input-group mb-3">
              <div class="input-group-prepend">
                <span class="input-group-text" id="basic-addon1">PHP</span>
              </div>
              <input id="editPhp" type="text" class="form-control" placeholder="PHP" aria-label="php" aria-describedby="basic-addon1">
            </div>
            <div class="input-group mb-3">
              <div class="input-group-prepend">
                <span class="input-group-text" id="basic-addon1">Python</span>
              </div>
              <input id="editPython" type="text" class="form-control" placeholder="Python" aria-label="python" aria-describedby="basic-addon1">
            </div>
            <div class="input-group mb-3">
              <div class="input-group-prepend">
                <span class="input-group-text" id="basic-addon1">大二班级</span>
              </div>
              <select id="editClass2" type="text" index='5' class="form-control" aria-label="first" aria-describedby="basic-addon1">
              </select>
            </div>
          </div>

          <div class="modal-footer">
            <button type="button" class="btn btn-secondary" data-dismiss="modal" >取消</button>
            <button type="button" class="btn btn-primary" id="editSave">保存</button>
          </div>
        </div>
      </div>
    </div>

    <!-- 改变填报时间 modal -->
    <div class="modal fade" id="chengTimeModal" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="staticBackdropLabel" aria-hidden="true">
        <div class="modal-dialog modal-lg" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="staticBackdropLabel">填报时间</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <div class="input-group">
                        <span class="input-group-btn">
                            <button class="btn btn-default" type="button">
                                开始
                            </button>
                        </span>
                        <input type="datetime-local" class="form-control startTime">
                    </div>
                    <div class="input-group mt-2 ">
                        <span class="input-group-btn">
                            <button class="btn btn-default" type="button">
                                结束
                            </button>
                        </span>
                        <input type="datetime-local" class="form-control endTime">
                    </div>

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
                    <button type="button" class="btn btn-primary" id="submitTime">保存</button>
                </div>
            </div>
        </div>
    </div>




        <!-- 班级管理 modal -->
  <div class="modal fade" id="classManage" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="staticBackdropLabel" aria-hidden="true">
  <div class="modal-dialog modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="staticBackdropLabel">Modal title</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        <table class="table">
          <thead>
            <tr>
              <th class='text-center'></th>
              <th class='text-center'>班级名称</th>
              <th class='text-center'>专业方向</th>
              <th class='text-center'>人数</th>
              <th class='text-center'>操作</th>
            </tr>
          </thead>
          <tbody id="classBody">
          </tbody>
        </table>
        <button class="btn btn-success" id="addClass">添加</button>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary" id="saveClass">保存</button>
      </div>
    </div>
  </div>
</div>



    <!-- 自定义工具栏按钮 -->
    <button class="btn btn-danger form-control" id="startChange">开始分班</button>
		<div class="input-group-prepend" id="button-addon3">
			<label id="btnUpdata" for="inpUpdata" class="btn btn-secondary">导入</label>
			<input style="display: none;" type="file" id="inpUpdata" value="" />
    </div>
    <button type="button" class="btn btn-secondary form-control" id="saveExcel">保存</button>
    <button type="button" id="editproportion" class="btn btn-secondary form-control" data-toggle="modal" data-target="#proportion">成绩比例</button>
    <button type="button" id="classManageShow" class="btn btn-secondary form-control" data-toggle="modal" data-target="#classManage">班级管理</button>
    <a href="/progress" target="_blank" class="btn btn-secondary form-control" >填报情况</a>
    <a href="/majorAdmin" target="_blank" class="btn btn-secondary form-control" >专业管理</a>
    <button type="button"  class="btn btn-secondary form-control" data-toggle="modal" id="loadActivityTime" data-target="#chengTimeModal">填报时间</button>
        <select class="form-control" name="customSearch" id="customSearch"   >
		  <option value="name">姓名</option>
		  <option value="stu_id">学号</option>
		  <option value="class_base">大一班级名称</option>
		  <option value="class_new_id">大二班级</option>
		  <option value="subject">所学专业</option>
 		  <option value="class_first_id">自动分配班级</option>
        </select>
  </div>
  <!-- <p class="mb-0"> </p> -->
  </div>
<!--  隐藏分页-->
<!--  data-search="true"-->
  <table
  id="table"
  data-search="true"
  data-show-export="true"
  data-pagination="true"
  data-click-to-select="true"
  data-toolbar="#toolbar"
  data-show-toggle="true"
  data-show-columns="true"
  data-locale="zh-CN"
  data-custom-search="customSearch"
  data-show-button-text="true"
  data-show-pagination-switch="true"
  data-pagination="true"
  data-page-size = 60
  data-side-pagination="false"
  data-page-list="[25, 50, 55, 60, 100, 200, All]"
  data-pagination-successively-size = 7
  data-resizable="true"
  data-show-columns="true"
  data-toggle="table"
>
    <thead>
      <tr>

      </tr>
    </thead>
  </table>

  <script src="./js/userPulic.js"></script>
  <script src="./js/table.js"></script>
  <script src="./js/bjgl.js"></script>
</body>
</html>
